<?php

/**
 * sfGuardUser form.
 *
 * @package    SistemaWebUnlSenescyt
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrinePluginFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class sfGuardUserForm3 extends PluginsfGuardUserForm {

    public function configure() {
        $this->useFields(array('password'));

        $this->widgetSchema['password'] = new sfWidgetFormInputPassword();
        $this->validatorSchema['password']->setOption('required', true);
        
        $this->widgetSchema['password_confirmation'] = new sfWidgetFormInputPassword();
        $this->validatorSchema['password_confirmation'] = clone $this->validatorSchema['password'];
        $this->widgetSchema->setLabels(array(
            'password' => 'Nueva Contraseña',
            'password_confirmation' => 'Repita la<br />Nueva Contraseña',            
        ));

        //$this->widgetSchema->moveField('password_confirmation', 'after', 'password');

        $this->mergePostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_confirmation', array(), array('invalid' => 'The two passwords must be the same.')));


//        unset(
//      $this['is_active'],
//      $this['is_super_admin'],
//      $this['updated_at'],
//      $this['groups_list'],
//      $this['permissions_list'],
//      $this['last_login'],
//      $this['created_at'],
//      $this['salt'],
//      $this['algorithm']
//    );
//        
    }

}
